package com.api.user.service.impl;

import com.api.user.dao.PaymentOrderMapper;
import com.api.user.model.PaymentOrder;
import com.api.user.service.PaymentOrderService;
import com.api.core.service.AbstractService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import com.api.common.JSONUtils;
import com.api.core.response.Result;
import com.api.core.response.ResultGenerator;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

/**
 * Created by wanghuiwen on 2021/09/10.
 */
@Service
@Transactional
public class PaymentOrderServiceImpl extends AbstractService<PaymentOrder> implements PaymentOrderService {
    @Resource
    private PaymentOrderMapper paymentOrderMapper;

    @Override
    public Result list(Integer orderType, Long id, Integer page, Integer size) {
        PageHelper.startPage(page, size);
        List<PaymentOrder> paymentOrders = paymentOrderMapper.list(orderType,id);
        return ResultGenerator.genSuccessResult(paymentOrders);
    }
}
